		
		
			<?php
			
			global $king;

	$pid='{king:pid/}';

	$rn=isset($_GET['rn']) ? kc_get('rn',2,1) :12;
	if($rn>100) $rn=100;	
	$number=$rn;
	$skip= ($pid=='1')?0:(((int)$pid)-1) * $number;	
	$limit='limit '.$skip.','.$number;

	
	if($data=$king->db->getRows("select kid,ktitle,listid,ndate,nlastdate,kimage,kdescription,kcontent from %s__article where nshow=1 order by nlastdate desc ".$limit."")){	
	
			foreach($data as $ke => $rs){	

				$ti='<h2><a href="/browse/page/'.$rs['listid'].'/'.$rs['kid'].'/">'.$rs['ktitle'].'</a></h2>';
				if(!empty($rs['kimage'])){
				$im='<div class="img_ls"><a href="/browse/page/'.$rs['listid'].'/'.$rs['kid'].'/"><img src="'.kc_FullPath($rs['kimage']).'"/></a></div>';}else{
				$im='';
				}
				if(empty($rs['kdescription'])){
				$dc='<p>'.kc_short(SpHtml2Text($rs['kcontent']),'131','10').'</p></div>';
				}else{
				$dc='<p>'.SpHtml2Text($rs['kdescription']).'</p></div>';
				}
				
				if($ke=='0' || $ke=='6') $sb.='<div class="page_lt_1">'.$ti.$im.$dc;
				if($ke=='1' || $ke=='7') $sb.='<div class="page_rt_1">'.$im.$ti.$dc;
				if($ke=='2' || $ke=='8') $sb.='<div class="page_rt_1_1">'.$im.$ti.$dc;
				if($ke=='3' || $ke=='9') $sb.='<div class="page_lt_2">'.$ti.$im.$dc;
				if($ke=='4' || $ke=='10') $sb.='<div class="page_rt_2">'.$im.$ti.$dc;
				if($ke=='5' || $ke=='11') $sb.='<div class="page_rt_2_2">'.$im.$ti.$dc;
			   

			}
	
		echo $sb;
	
	}else{
		$s='<p class="k_err">暂时没有文章!</p>';
	}
	
			echo $s;
			?>

<div class="page_page k_pagelist">
{king:pagelist}


		{king:First replace='First|第一页'/}	<!-- 第一页,英文为First，同上替换 -->
        {king:Previous replace='Previous|上一页'/}	<!-- 上一页,输出字符为英文Previous，要替换成中文，则用replace属性：{king:prevreplace='Previous|上一页'} -->
		 {king:standard/}	<!-- 12…345..78形式的分页,自动补充省略符 -->
        {king:Next replace='Next|下一页'/}	<!-- 下一页,英文为Next，同上替换 -->
        {king:Last replace='Last|最后一页'/}

{/king:pagelist}
</div>	
	